﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Rose.Models.RecommendModel>" %>
<%@ Import Namespace="Rose.Helper" %>


 <% CheckRelationHelpModel help = new CheckRelationHelpModel();
     
    string selfId = new CheckHelpModel().CheckCurrentUserId();
     
    var item = Model;
    bool isFriend = help.IsFriendRelation(selfId, item.UserId);
    bool isFocus = help.IsFocusRelation(selfId, item.UserId);
    string gender = item.Gender == "男" ? "他" : "她";
     
      %>

<%if (item.UserId != selfId)
  { %>
      <div class="request">

<div class="bigimagepart"><img class="friendimage" data="<%=item.UserId %>"

<%if(isFriend){ %>
onclick="FriendAlbum(this);"
<%} else {%>
onclick="PublicAlbum(this);"
<%} %>

 src="<%=item.ImagePath %>" /></div>
<div class="requestcontent">
<p><a class="laber">姓名:</a><a class="info" href="<%=Url.Action("Friend","FriendTrend",new{friendId=item.UserId}) %>"><%=item.TrueName %></a></p>
<p><a class="laber">学校信息:</a><a class="info"><%=item.University %></a></p>
<p><a class="laber">家庭地址:</a><a class="info"><%=item.Address %></a></p>
<p><a class="laber">入学时间:</a><a class="info"><%=item.SchoolYear %></a></p>
<p><a class="laber">兴趣爱好:</a><a class="info tb">羽毛球-漫画-火影忍者-海贼王-漫画-火影忍者-海贼王</a></p>

</div>

  
  <p class="response">

  <%if(!isFriend){ %>
    <a class="addfriend" onclick="AddFriend(this);" data="<%=item.UserId %>">加为好友</a>
<%} %>

<%if (isFriend)
  { %>
  <a class="deletefriend" onclick="DeleteFriend(this);" data="<%=item.UserId %>">取消好友</a>
<%} %>

<%if (!isFocus)
  { %>
  <a class="addfocus" data="<%=item.UserId %>" onclick="AddFocus(this);">关注<%=gender %></a>
<%} %>

<%if (isFocus)
  { %>
  <a class="deletefocus" data="<%=item.UserId %>" onclick="DeleteFocus(this);">取消关注</a>
  <%} %>

</p>
  
  
  
</div><!--end of request--> 
<%} %>